<?php

namespace App\Adapter\objectadapter;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class VoltageAdapter implements IVoltage5V
{

    private $voltage220V; // 关联关系-聚合
    ////通过构造器，传入一个 Voltage220V 实例
    public function __construct(Voltage220V $voltage220V)
    {
        $this->voltage220V = $voltage220V;
    }

    public function output5V()
    {
        // TODO: Implement output5V() method.
        $srcV = $this->output220V();
        $dstV = $srcV / 44;
        return $dstV;
    }
}
